<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/admin/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/admin/css/main.css"/>
    <script type="text/javascript" src="__PUBLIC__/static/admin/js/libs/modernizr.min.js"></script>
</head>
<body>
    {include file="Public/top" /}
    <div class="container clearfix">
        {include file="Public/left" /}
        <!--/sidebar-->
        <div class="main-wrap">

            <div class="crumb-wrap">
                <div class="crumb-list"><i class="icon-font"></i><a href="{:url('admin/index/index')}">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="{:url('admin/article/lst')}">问卷模板</a><span class="crumb-step">&gt;</span><span>新增问卷模板</span></div>
            </div>
            <div class="result-wrap">
                <div class="result-content">
                
                    <form action="" method="post" id="myform" name="myform" enctype="multipart/form-data">
                        <table id="myTable" class="insert-tab" width="100%">
                            <tbody>
                                <tr>
                                    <th width="10%"><i class="require-red">*</i>问卷名称：</th>
                                    <td>
                                        <input class="common-text required" id="catename" name="catename" size="50" value="" type="text">
                                    </td>
                                </tr>
                                <tr>
                                    <th>问卷描述：</th>
                                    <td><textarea name="desc" class="common-textarea" id="desc" cols="30" style="width: 50%;" rows="2"></textarea></td>
                                </tr>

                                <tr id="w1">
                                    <th>问题一：</th>
                                    <td>
                                        <p>问题标题</p><input class="common-text" name="title" size="50" value="" type="text">
                                        <p>问题类型： <input name="type" value="1" type="radio" checked="" /> 单选题 <input name="type" value="2" type="radio" /> 多选题 </p>
                                        <p>选项1：<input class="common-text" name="answer1" size="50" value="12" type="text"></p>
                                        <p>选项2：<input class="common-text" name="answer2" size="50" value="13" type="text"></p>
                                        <p>选项3：<input class="common-text" name="answer3" size="50" value="13" type="text"></p>
                                        <p>选项4：<input class="common-text" name="answer4" size="50" value="13" type="text"></p>
                                        <p>选项5：<input class="common-text" name="answer5" size="50" value="13" type="text"></p>
                                        <p>选项6：<input class="common-text" name="answer6" size="50" value="13" type="text"></p>

                                <!--  <p id="p1"></p>
                                <a href="#"><p  onclick="changetext(this)">＋增加一个选项</p></a> -->

                            </td>
                        </tr>
                        <tr id="w2" style="display:none ;">
                            <th>问题二：</th>
                            <td>
                                <p>问题标题</p><input class="common-text" name="title2" size="50" value="gmt112" type="text">
                                <p>问题类型： <input name="type" value="1" type="radio" /> 单选题 <input name="type" value="1" type="radio" /> 多选题 </p>
                                <p>选项1：<input class="common-text" name="contens2" size="50" value="" type="text"></p>
                                <p>选项2：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项3：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项4：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项5：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项6：<input class="common-text" name="keywords" size="50" value="" type="text"></p>

                            </td>
                        </tr>
                        <tr id="w3" style="display:none ;">
                            <th>问题三：</th>
                            <td>
                                <p>问题标题</p><input class="common-text" name="keywords" size="50" value="" type="text">
                                <p>问题类型： <input name="type" value="1" type="radio" /> 单选题 <input name="type" value="1" type="radio" /> 多选题 </p>
                                <p>选项1：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项2：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项3：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项4：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项5：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项6：<input class="common-text" name="keywords" size="50" value="" type="text"></p>

                            </td>
                        </tr>
                        <tr id="w4" style="display:none ;">
                            <th>问题四：</th>
                            <td>
                                <p>问题标题</p><input class="common-text" name="keywords" size="50" value="" type="text">
                                <p>问题类型： <input name="type" value="1" type="radio" /> 单选题 <input name="type" value="1" type="radio" /> 多选题 </p>
                                <p>选项1：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项2：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项3：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项4：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项5：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项6：<input class="common-text" name="keywords" size="50" value="" type="text"></p>

                            </td>
                        </tr>
                        <tr id="w5" style="display:none ;">
                            <th>问题五：</th>
                            <td>
                                <p>问题标题</p><input class="common-text" name="keywords" size="50" value="" type="text">
                                <p>问题类型： <input name="type" value="1" type="radio" /> 单选题 <input name="type" value="1" type="radio" /> 多选题 </p>
                                <p>选项1：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项2：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项3：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项4：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项5：<input class="common-text" name="keywords" size="50" value="" type="text"></p>
                                <p>选项6：<input class="common-text" name="keywords" size="50" value="" type="text"></p>

                            </td>
                        </tr>
                        <tr><th><a href="#"><p  onclick="w2(this)">＋增加一个问题</p></a></th><td><div  onclick="clickMeEvent(this)">1</div></td></tr>                            
                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                    </form>
                </div>
            </div>

        </div>


                            <script type="text/javascript">
function insRow()
  {
    
  n = parseFloat(num.innerHTML) + 1;
  num.innerHTML= n;
  var x=document.getElementById('myTable').insertRow(-1)
  var y=x.insertCell(0)
  var z=x.insertCell(1)
  y.innerHTML="问题 " + n
  z.innerHTML='<h1>ELL2</h1> <table  border="1"><tr><td>Row1 cell1</td><td>ow1 cell2</td></tr></table>'
  }
</script>
 
<table  class="insert-tab11"   >
<tr>
<th><span id="num" style="display: none">1</span><i class="require-red">*</i>问卷名称：</th>
<td><input class="common-text required" id="catename" name="catename" size="50" value="" type="text"></td>
</tr>
<tr>
<td>问卷描述：</td>
<td>Row2 cell2</td>
</tr>
<tr>
<td>问题1</td>
<td>Row3 cell2</td>
</tr>
</table>
<br />
<input type="button" onclick="insRow()" value="增加">
<a href="#"><p  onclick="insRow()">＋增加一个问题</p></a>
        <script type="application/javascript">
            <!--
            function clickMeEvent(obj)
            {
                if (obj.innerHTML=="36")
                {
                    obj.style.display="none";
                }
                else if (obj.innerHTML=="5")
                {
                    obj.innerHTML="已经到三了";     
                }
                else if (obj.innerHTML=="点击这里<br>再次点击这里<br>再点一次")
                {
                    obj.innerHTML="谢谢";     
                }
                else if (obj.innerHTML=="点击这里<br>再次点击这里")
                {
                    obj.innerHTML=obj.innerHTML+"<br>再点一次";     
                }
                else
                {

                    w2 = parseFloat(obj.innerHTML) + 1;
                    w2 = "w" + w2;
                    document.getElementById(w2).style.display='';
                    obj.innerHTML=parseFloat(obj.innerHTML) + 1;
                }
            }
    //-->


    function changetext(id)
    {
                             // id.innerHTML="谢谢!";
                             txt2= document.getElementById("p1").innerHTML ;
                             document.getElementById("p1").innerHTML=txt2 + "<p>选项：<input class='common-text'  size='50' value='' type='text'> </p>";
                         }
                         function w2(id)
                         {

                             // id.innerHTML="谢谢!";
                            // txt2= document.getElementById("p1").style ;
                            // document.getElementById("p1").style ='display:';
                            // document.getElementById('w2').style.visibility='visible';
                            document.getElementById('w2').style.display='';
          // document.getElementById("p1").innerHTML=txt2 + "<p>选项：<input class='common-text'  size='50' value='' type='text'> </p>";
      }
      function changetext2(id)
      {
                             // id.innerHTML="谢谢!";
                             txt2= document.getElementById("p2").innerHTML ;
                             document.getElementById("p2").innerHTML='<tr>'+txt2 +'</tr>' +txt2;
                         } 
                     </script>
                     <!--/main-->
                 </div>
             </body>
             </html>